﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:converters="clr-namespace:ISRecord.View"
                    xmlns:wpfExtended="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended"
                    xmlns:p="clr-namespace:ISRecord.View.Properties">
    <converters:MaskBoxConverter x:Key="dateConverter" x:Shared="False"/>
    <converters:BackgroundBrushConverter x:Key="backgroundConverter" x:Shared="False" />
    <SolidColorBrush x:Key="LightBlue" Color="LightBlue"/>
    <SolidColorBrush x:Key="LightSlateGray" Color="LightSlateGray"/>
    <SolidColorBrush x:Key="LightGoldenrodYellow" Color="LightGoldenrodYellow"/>
    <SolidColorBrush x:Key="LightGreen" Color="LightGreen"/>
    <SolidColorBrush x:Key="DefaultColor" Color="#FFFFFFFF"/>
    <Style x:Key="UserControlStyle" TargetType="{x:Type UserControl}">
        <Setter Property="Background" Value="{Binding Source={x:Static p:Settings.Default}, Path=Background, Converter={StaticResource backgroundConverter}}"/>
        <Setter Property="FlowDirection" Value="RightToLeft"/>
        <Setter Property="Margin" Value="3.5"/>
        <Setter Property="Padding" Value="3.5"/>
        <Setter Property="BorderThickness" Value="2"/>
        <Setter Property="BorderBrush" Value="Black"/>
    </Style>
    
    <Style x:Key="WindowStyle" TargetType="Window">
        <Setter Property="Background" Value="{Binding Source={x:Static p:Settings.Default}, Path=Background, Converter={StaticResource backgroundConverter}, FallbackValue={StaticResource DefaultColor}}"/>
        <Setter Property="FlowDirection" Value="RightToLeft"/>
        <Setter Property="Margin" Value="3.5"/>
        <Setter Property="Padding" Value="3.5"/>
        <Setter Property="BorderThickness" Value="2"/>
        <Setter Property="BorderBrush" Value="Black"/>
        <Setter Property="FontFamily" Value="{Binding Source={x:Static p:Settings.Default}, Path=Font}"/>
        <Setter Property="FontSize" Value="{Binding Source={x:Static p:Settings.Default}, Path=FontSize}"/>
    </Style>
    <Style TargetType="{x:Type wpfExtended:MessageBox}">
        <Setter Property="FlowDirection" Value="RightToLeft" />
        <Setter Property="FontSize" Value="18"/>
    </Style>

    <DataTemplate x:Key="MaskedCellTemplate" >
        <wpfExtended:MaskedTextBox IncludeLiterals="False" Mask="## /##/ ####" 
                                   Value="{Binding Path=OutboxDate, Converter={StaticResource dateConverter}}"
                                   IsReadOnly="False" />
			  							    
    </DataTemplate>

    <Style x:Key="GridStyle" TargetType="DataGrid">
		<Setter Property="RowHeaderWidth" Value="25"/>
		<Setter Property="SelectionMode" Value="Single"/>
	</Style>
	<Style x:Key="GridRowStyle" TargetType="DataGridRow">
        <Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="White"/>
                    <GradientStop Color="FloralWhite" Offset=".5"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>

    </Style>

</ResourceDictionary>